package com.sky.business.sys.service.impl;

import com.sky.business.sys.domain.CameraConfig;
import com.sky.business.sys.service.MQTTService;
import org.springframework.stereotype.Service;

/**
 * @description MQTT服务类，负责调用发送消息
 */
@Service
public class MQTTServiceImpl implements MQTTService {

//    @Resource
//    private CMCCMQTTClientUtils cmccMQTTClientUtils;

    /**
     * 向主题发送消息
     * @param topicName
     * @param message
     */
    public void sendMessageToCMCC(String topicName, String message){
//        cmccMQTTClientUtils.publish(topicName, message);
    }

    /**
     * 向主题发送消息
     * @param topicName 主题名称
     * @param qos qos
     * @param message 具体消息
     */
    public void sendMessageToCMCC(String topicName,int qos, String message){
//        cmccMQTTClientUtils.publish(topicName, qos, message);
    }

    public void cleanTopicToCMCC(String topicName){
//        cmccMQTTClientUtils.cleanTopic(topicName);
    }

    @Override
    public void subscribeTopicToCMCC(CameraConfig cameraConfig) {
//        cmccMQTTClientUtils.subscribe(cameraConfig.getDispatcherTopic(), 1 , statusCallBackListener);
//        cmccMQTTClientUtils.subscribe(cameraConfig.getReportingTopic(), 1 , taskCallBackListener);
    }
}
